/**
 * MyEHCache.java - 2013-8-19
 *
 * Licensed Property to China UnionPay Co., Ltd.
 * 
 * (C) Copyright of China UnionPay Co., Ltd. 2010
 *     All Rights Reserved.
 *
 * Project Info: China UnionPay Internet Acquiring Project
 * 
 * Modification History:
 * =============================================================================
 *   Author         Date          Description
 *   ------------ ---------- ---------------------------------------------------
 *        
 * =============================================================================
 */
package com.lijin.workshop.test.ehcache;

import net.sf.ehcache.Ehcache;
import net.sf.ehcache.Element;

/**
 * Description: 
 *
 * (C) Copyright of China UnionPay Co., Ltd. 2010.
 *
 */
public class MyEHCache {

	private final Ehcache cache;
	
	public MyEHCache(Ehcache cache) {
		this.cache = cache;
	}
	
	public void saveData(String key, Object val) {
		if (cache.get(key) == null) {
			System.out.println("key已存在.." + key);
		}
		Element e = new Element(key, val);
		cache.put(e);
	}
}
